package com.hckjsec.website.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hckjsec.website.mapper.WebSiteNewsMapper;
import com.hckjsec.website.domain.WebSiteNews;
import com.hckjsec.website.service.IWebSiteNewsService;

/**
 * 新闻动态Service业务层处理
 * 
 * @author cyt
 * @date 2021-10-18
 */
@Service
public class WebSiteNewsServiceImpl implements IWebSiteNewsService 
{
    @Autowired
    private WebSiteNewsMapper webSiteNewsMapper;

    /**
     * 查询新闻动态
     * 
     * @param id 新闻动态ID
     * @return 新闻动态
     */
    @Override
    public WebSiteNews selectWebSiteNewsById(Long id)
    {
        return webSiteNewsMapper.selectWebSiteNewsById(id);
    }

    /**
     * 查询新闻动态列表
     * 
     * @param webSiteNews 新闻动态
     * @return 新闻动态
     */
    @Override
    public List<WebSiteNews> selectWebSiteNewsList(WebSiteNews webSiteNews)
    {
        return webSiteNewsMapper.selectWebSiteNewsList(webSiteNews);
    }

    /**
     * 新增新闻动态
     * 
     * @param webSiteNews 新闻动态
     * @return 结果
     */
    @Override
    public int insertWebSiteNews(WebSiteNews webSiteNews)
    {
        return webSiteNewsMapper.insertWebSiteNews(webSiteNews);
    }

    /**
     * 修改新闻动态
     * 
     * @param webSiteNews 新闻动态
     * @return 结果
     */
    @Override
    public int updateWebSiteNews(WebSiteNews webSiteNews)
    {
        return webSiteNewsMapper.updateWebSiteNews(webSiteNews);
    }

    /**
     * 批量删除新闻动态
     * 
     * @param ids 需要删除的新闻动态ID
     * @return 结果
     */
    @Override
    public int deleteWebSiteNewsByIds(Long[] ids)
    {
        return webSiteNewsMapper.deleteWebSiteNewsByIds(ids);
    }

    /**
     * 删除新闻动态信息
     * 
     * @param id 新闻动态ID
     * @return 结果
     */
    @Override
    public int deleteWebSiteNewsById(Long id)
    {
        return webSiteNewsMapper.deleteWebSiteNewsById(id);
    }
}
